<template>
  <div class="index">
    <el-container>
      <el-aside width="200px">
        <div class="kao">
          <div>
            <el-icon color="#ffab00" size="20"><Management /></el-icon>
          <span>考勤管理</span>
          </div>
          <div>
            <el-icon  size="20"><MoreFilled /></el-icon>
          <el-icon color="#ffab00" size="20"><CirclePlusFilled /></el-icon>
          </div>
        </div>
        <el-menu
        active-text-color="#aaaa00"
        default-active="/index/business"
        class="el-menu-vertical-demo"
        @select="handleSelect"
        >
          <el-menu-item index="/index/business">
            <el-icon><Tickets /></el-icon>
            <span>出差申请</span>
          </el-menu-item>
          <el-menu-item index="/index/outside">
            <el-icon><Tickets /></el-icon>
            <span>外勤打卡</span>
          </el-menu-item>
          <el-menu-item index="/index/leave">
            <el-icon><Tickets /></el-icon>
            <span>请假申请</span>
          </el-menu-item>
          <el-menu-item index="/index/work">
            <el-icon><Tickets /></el-icon>
            <span>加班申请</span>
          </el-menu-item>
        </el-menu>
      </el-aside>
      <router-view></router-view>
    </el-container>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
var $router = useRouter()
var handleSelect = (index)=>{
  $router.push(index);
}
</script>
<style scoped lang="scss">
.kao{
  height: 60px;
  padding: 0 15px;
  line-height: 60px;
  border-right: 1px solid #e6eaf0;
  display: flex;
  justify-content: space-between;
  .el-icon{
    margin: 0 5px;
  }
  span{
    font-weight: bold;
  }
}
.is-active{
color: #fb9337;
background-color: #fcebdc;
}
</style>